<%--
  Created by IntelliJ IDEA.
  User: teacher
  Date: 2022/4/20
  Time: 13:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>文件上传</title>
</head>
<body>
<h1>文件上传</h1>
<hr/>
<!--
    当表单设置使用二进制流的访问进行数据传输的时候
    表单的提交方式必须是post
-->
<form action="${pageContext.request.contextPath}/upload.file" method="post" enctype="multipart/form-data">
    用户名:<input type="text" name="username"/><br/>
    文&nbsp;&nbsp;&nbsp;件:<input type="file" name="file"/><br/>
    <input type="submit" value="上传">
    <span style="color:red;">${uploadMsg}</span>
</form>
</body>
</html>
